<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			*{
				padding: 0;
				margin: 0;
			}
			img{
				display: block;
				margin: 0 auto;
			}
			img#menu.f{
				position: fixed;
				left: 50%;
				margin-left: -480px;
				top: 0;
			}
		</style>
		<script src='jquery-3.4.1.js'></script>
		<script src='jquery.easing.1.3.js'></script>
		<script>
			$(function(){
				$(function(){
					//给浏览器加滚动条事件
					$(window).scroll(function(){
						//获得当前已经滚动上去的距离
						var t=$(document).scrollTop();
						document.title=t;
						if(t>218){
							//让导航条固定定位
//							$("#menu").css({"position":'fixed','top':'0','left':'50%','margin-left':'-480px'})
							$("#menu").addClass('f');
						}
						else{
							$("#menu").removeClass('f')
						}
					})
				})
			})
		</script>
	</head>
	<body>
		
		<img src="../上课笔记/img/2142.png" alt="" />
		<img src="../上课笔记/img/2141.png" alt="" id='menu' class='f'/>
		<img src="../上课笔记/img/2143.png" alt="" />
	</body>
</html>
